//
//  XJYGroupViewCell.m
//  ShopMall
//
//  Created by XJY on 17/1/21.
//  Copyright © 2017年 XinJinYing. All rights reserved.
//

#import "XJYGroupViewCell.h"
#import <UIImageView+WebCache.h>

@interface XJYGroupViewCell ()

@property (nonatomic, strong) UIImageView *groupImage; //团购展示图片

@end


@implementation XJYGroupViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addSubview:self.groupImage];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    __weak typeof(self) weakSelf = self;
    [_groupImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(weakSelf).with.insets(UIEdgeInsetsMake(0, 0, 10, 0));
    }];
}

- (void)setImageUrl:(NSString *)ImageUrl{
    [_groupImage sd_setImageWithURL:[NSURL URLWithString:ImageUrl]];
}

- (UIImageView *)groupImage{
    if (!_groupImage) {
        _groupImage = [[UIImageView alloc]init];
    }
    return _groupImage;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
